<?php

class Admin_Form_UsuarioCadastrar extends Twitter_Bootstrap_Form_Horizontal
{

    public function init()
    {
        $this->setIsArray(true)
             ->setElementsBelongTo('');       
        
        $this->setAction('/admin/usuarios/incluir')
             ->setName('Form_IncluirUsuario')
             ->setAttrib('id', 'form_incluir_usuario')
             ->setMethod('post');    
        
        
        $this->addElement('text', 'matricula', array('label'        => 'Matrícula:*',
                                                     'required'     => true,
                                                     'class'        => '',
                                                     'filters'      => array('StringTrim', 'StripTags'),
                                                     'validators'   => array(array('StringLength', false, array(3,10)))
        
                          ));

        
        $this->addElement('text', 'nome', array('label'        => 'Nome:*',
                                                'required'     => true,
                                                'maxlength'    => 100,
                                                'class'        => 'span10',
                                                'filters'      => array('StringTrim', 'StripTags'),
                                                'validators'   => array(array('StringLength', false, array(3,100)))
                          ));         
        
        
        $this->addElement('text', 'UA',  array('label'        => 'UA:*',
                                               'required'     => true,
                                               'class'        => 'span6'
                          ));     
        

        $this->addElement('password', 'senha', array('label'        => 'Senha:*',
                                                     'required'     => true,
                                                     'class'        => 'span6'
                          ));       
                
        
        $this->addElement('submit', 'btnConsultar', array('label' => 'Cadastrar',
                                                          'class' => 'btn btn-primary'));
        
        
    }
}